package files;

import java.io.File;

public class Demo4 {
    public static void main(String[] args) {
        File file = new File("C:\\Users\\ASUS\\Desktop\\Files");
        File[] files = file.listFiles();
        for(int i = 0; i < files.length; i++){
            System.out.print(files[i].getAbsolutePath());
            if(files[i].isFile()){
                System.out.println("----------文件");
            }
            if(files[i].isDirectory()){
                System.out.println("---------文件夹");
            }
        }
    }
}
